<div class="question" id="question-<?=$question['Question']['id']?>">
    <div class="title"><?=$question['Question']['title']?><div class="question-action" align="right"><a href="#" class="button" onclick="return question_ec('question-<?=$question['Question']['id']?>')">Collapse</a><a href="#" class="button" onclick="return edit_question('<?=$question['Question']['id']?>')">Edit</a><a href="#"class="button"  onclick="return remove_question('<?=$question['Question']['id']?>')">Remove</a></div>
    </div>
    <div class="option-list">
        <ul>
            <?php 
            $questions = QuestionOption::get_options_by_question($question['Question']['id']);
            $answer = Answer::get_answers_by_questions($question['Question']['id']);
            $type = "radio";
            if ($question['Question']['type']==Question::CHECKBOX) {
                $type="checkbox";
            }    
            foreach ($questions as $value) { 
                ?>
            <li class="option" ><input disabled="disabled"  <?php echo (in_array($value['Option']['id'], $answer))?"checked='checked'":"" ?> type="<?=$type?>" name="option_<?=$question['Question']['id']?>" /> <?=$value['Option']['title']?></li>    
            <?php }
            ?>
            <?php if($question['Question']['has_other']==1){?>
            <li class="option" ><input disabled="disabled"  type="<?=$type?>" name="option_<?=$question['Question']['id']?>" /> Other : <input disabled="disabled"  type="text" style="width:360px" class="long-text input-form"/></li>    
            <?php } ?>
        </ul>
    </div>
</div>